<?php


class PropertyDetailTable extends ControlledVocabTypeTable
{
    public function getPropertyDetailListQuery(Doctrine_Query $q = null) {
        if ($q == null) {
            $q  = $this->createQuery();
        }
        
        $q->addOrderBy('displayGroupBy, typeName, uin');
        
        return $q;
    }

    public function getPropertyDetailByIdentifier($identifier) {
        $q = $this->createQuery();
        $q->addWhere('typeValue = ? ',$identifier);
        return $q->fetchOne();
    }


    public static function getInstance()
    {
        return Doctrine_Core::getTable('PropertyDetail');
    }
}